package cn.thoughtworks.school.usercenter.entities;

import org.hibernate.annotations.DynamicInsert;

import javax.persistence.*;
import javax.validation.constraints.NotNull;

@Entity
@DynamicInsert
@Table(name = "nodeBBUser")
public class NodeBBUser {

    @Column
    @NotNull
    private String username;

    @Column
    @NotNull
    private String password;

    @Id
    private Long userId;

    public NodeBBUser(String username, String password, Long userId) {
        this.username = username;
        this.password = password;
        this.userId = userId;
    }

    public NodeBBUser() {
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }
}
